package lee;

import java.util.ArrayList;
import java.util.List;

public class List1 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("I");
        list.add("am");
        list.add("chosen one");
        list.add("and");
        list.add("only one");
        list.add("yeah!");

        System.out.println(list);

        String o = list.get(4);
        System.out.println(o);

        list.set(5,"wool");
        System.out.println(list);

        list.remove(5);
        System.out.println(list);

        List<String> sub = list.subList(3,5);
        System.out.println(sub);

        list.add(0,"love you");
        System.out.println(list);


    }
}
